package com.yuou.data.logscollection.server.config;

import feign.Logger;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @author Administrator
 */
@Component
public class FeignClientConfig {
    @Bean
    public RequestInterceptor headerInterceptor() {
        return new RequestInterceptor() {
            @Override
            public void apply(RequestTemplate requestTemplate) {
                // 这里可以在 feign请求出去之前注入些数据

            }
        };
    }

    @Bean
    public Logger.Level level() {
        return Logger.Level.FULL;
    }
}
